﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.LightSwitch;
namespace LightSwitchApplication
{
    public partial class Order
    {
        partial void OrderTotal_Compute(ref decimal result)
        {
            // Set result to the desired field value
            foreach (Order_Detail od in Order_Details)
            {
                result = result += (od.UnitPrice*od.Quantity);
            }
            result = result + Freight.Value;
        }
    }
}
